package com.tc.dispatch.gsservice.ejb;

import java.util.*;
import javax.ejb.*;

import com.tc.dispatch.gsalgorithm.spec.*;
import com.tc.dispatch.gsservice.basic.common.*;

import com.tc.dispatch.gsservice.exception.*;
import com.tc.dispatch.gsservice.model.*;
import com.tc.dispatch.gsservice.util.*;
import com.tc.dispatch.gsservice.model.OutProcess;
import com.tc.dispatch.gsservice.action.GSCalcAction;
import com.tc.dispatch.gsservice.action.GSSimilary;
import com.tc.dispatch.gsservice.filter.GsFilter;
import com.tc.dispatch.gsservice.exception.GSException;
import com.tc.dispatch.gsservice.action.GSCalcActionImp;


import org.apache.commons.logging.LogFactory;
import org.apache.commons.logging.Log;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.PropertyConfigurator;


public class GSServiceBean
    implements SessionBean {
  SessionContext sessionContext;
  com.tc.dispatch.gsservice.sql.inter.OrderSumDAO ordersumdao;
  com.tc.dispatch.gsservice.sql.inter.DianDuDAO diandudao;


  com.tc.dispatch.gsservice.sql.inter.OrderSumMainDAO ordersummaindao;
  com.tc.dispatch.gsservice.sql.inter.OrderSumStepDAO ordersumstepdao;
  com.tc.dispatch.gsservice.sql.inter.OrderSumSubDAO ordersumsubdao;
  com.tc.dispatch.gsservice.sql.inter.WorkflowStepRelationDAO workflowsteprelationdao;
  com.tc.dispatch.gsservice.sql.inter.SpecTypeDAO spectypedao;
  com.tc.dispatch.gsservice.sql.inter.OutProcessDAO outprocessdao;
  com.tc.dispatch.gsservice.sql.inter.ProcessFeeDAO processfeedao;
  com.tc.dispatch.gsservice.sql.inter.ProcessYieldDAO processyielddao;
  com.tc.dispatch.gsservice.sql.inter.ProcessAreaDAO processareadao;
  com.tc.dispatch.gsservice.sql.inter.ProcessFlowDAO processflowdao;
  com.tc.dispatch.gsservice.sql.inter.ProcessGateDAO processgatedao;
  com.tc.dispatch.gsservice.sql.inter.ProcessNameDAO processnamedao;
  com.tc.dispatch.gsservice.sql.inter.OtherConstantsDAO otherconstantsdao;
  com.tc.dispatch.gsservice.sql.inter.SsignDensityDAO ssigndensitydao;
com.tc.dispatch.gsservice.sql.inter.DefaultCheckDAO defaultcheckdao;
  GSCalcAction gsc;
  int i=0;
  com.tc.dispatch.gsservice.sql.inter.QianDaoYieldDAO qiandaoyielddao;
  com.tc.dispatch.gsservice.sql.inter.PeiFangPriceDAO peifangpricedao;











  private static final Log log = LogFactory.getLog(GSServiceBean.class);


  public void ejbCreate() throws CreateException {
    /**@todo Complete this method*/
    ordersumdao = DAOFactory.getOrderSum();


    diandudao = DAOFactory.getDianDu();

    ordersummaindao = DAOFactory.getOrderSumMain();
    ordersumstepdao = DAOFactory.getOrderSumStep();
    ordersumsubdao = DAOFactory.getOrderSumSub();
    workflowsteprelationdao=DAOFactory.getWorkflowStepRelation();
    spectypedao=DAOFactory.getSpecType();
    outprocessdao=DAOFactory.getOutProcess();
    processfeedao=DAOFactory.getProcessFee();
    processyielddao=DAOFactory.getProcessYield();
    processareadao=DAOFactory.getProcessArea();
    processflowdao=DAOFactory.getProcessFlow();
    processgatedao=DAOFactory.getProcessGate();
    processnamedao=DAOFactory.getProcessName();
    otherconstantsdao=DAOFactory.getOtherConstants();
    ssigndensitydao=DAOFactory.getSsignDensity();
    defaultcheckdao=DAOFactory.getDefaultCheck();
    qiandaoyielddao=DAOFactory.getQianDaoYield();
    gsc=GSCalcActionImp.getInstance();
    peifangpricedao=DAOFactory.getPeiFangPrice();
    i++;
    //System.out.println(i);
  }

  public void ejbRemove() {
    /**@todo Complete this method*/
  }

  public void ejbActivate() {
    /**@todo Complete this method*/
  }

  public void ejbPassivate() {
    /**@todo Complete this method*/
  }

  public void setSessionContext(SessionContext sessionContext) {
    this.sessionContext = sessionContext;
  }




  public PeiFangPrice getPeiFangPrice(int fac, String ssign, int month1, int year1) throws GSException {
    /**@todo Complete this method*/
    return ordersumdao.getPeiFang(fac, ssign, month1, year1);
  }

  public HashMap getWeight() {
    /**@todo Complete this method*/
    HashMap hs1 = new HashMap();
    int[] weight_yz = GSSimilary.getWeight_yz();
    int[] weight_fk = new int[3];
    weight_fk = GSSimilary.getWeight_fk();
    hs1.put(specConst.YuanZhu, weight_yz);
    hs1.put(specConst.Fangkuai, weight_fk);
    hs1.put(specConst.PaoDao, GSSimilary.getWeight_pd());
    hs1.put(specConst.TaoKong, GSSimilary.getWeight_dk());
    hs1.put(specConst.TiXing, GSSimilary.getWeight_tx());
    hs1.put(specConst.TuoYuan, GSSimilary.getWeight_ty());
    hs1.put(specConst.WaXingAngle, GSSimilary.getWeight_waangle());
    hs1.put(specConst.WaXingXian, GSSimilary.getWeight_waxian());
    hs1.put(specConst.PaoDaoKong, GSSimilary.getWeight_pdk());
    //System.out.println("hs1:" + hs1);
    return hs1;
  }


  public void setWeight(HashMap hs) {
    /**@todo Complete this method*/
    int[] yz = (int[]) hs.get(specConst.YuanZhu);
    GSSimilary.setWeight_yz(yz[0], yz[1]);
    yz = (int[]) hs.get(specConst.Fangkuai);
    GSSimilary.setWeight_fk(yz[0], yz[1], yz[2]);
    yz = (int[]) hs.get(specConst.PaoDao);
    GSSimilary.setWeight_pd(yz[0], yz[1], yz[2], yz[3], yz[4]);
    yz = (int[]) hs.get(specConst.TaoKong);
    GSSimilary.setWeight_dk(yz[0], yz[1], yz[2]);
    yz = (int[]) hs.get(specConst.TiXing);
    GSSimilary.setWeight_tx(yz[0], yz[1], yz[2], yz[3]);
    yz = (int[]) hs.get(specConst.TuoYuan);
    GSSimilary.setWeight_ty(yz[0], yz[1], yz[2]);
    yz = (int[]) hs.get(specConst.WaXingAngle);
    GSSimilary.setWeight_waangle(yz[0], yz[1], yz[2], yz[3], yz[4]);
    yz = (int[]) hs.get(specConst.WaXingXian);
    GSSimilary.setWeight_waxian(yz[0], yz[1], yz[2], yz[3], yz[4]);
    yz = (int[]) hs.get(specConst.PaoDaoKong);
    GSSimilary.setWeight_pdk(yz[0], yz[1], yz[2], yz[3]);

  }



  public DianDuPrice getDianDu(String wherestr) throws GSException {
    /**@todo Complete this method*/
    return diandudao.getDianDu(wherestr);
  }

  public void updateDianDu(DianDuPrice dd) throws GSException {
    /**@todo Complete this method*/
    diandudao.updateDianDu(dd);
  }

  public void removeDianDu(String plate) throws GSException {
    /**@todo Complete this method*/
    diandudao.removeDianDu(plate);
  }

  public List findDianDu(String wherestr) throws GSException {
    /**@todo Complete this method*/
    return diandudao.findDianDu(wherestr);
  }

  public String createDianDu(DianDuPrice dd) throws GSException {
    /**@todo Complete this method*/
    return diandudao.createDianDu(dd);
  }


















  public List getFinishedPro(Date date1, Date date2, String sort) throws GSException {
    /**@todo Complete this method*/
    return ordersumdao.getFinishedOrder(date1, date2, sort);
  }

  public List getFinishedPro(String ssign, String spec, String plate, Date date1, Date date2) throws GSException {
    /**@todo Complete this method*/
    return ordersumdao.getFinishedOrder(ssign, spec, plate, date1, date2);
  }






  public String createHuilv(ExRate exrate) throws GSException {
    /**@todo Complete this method*/
    return ordersumdao.createExRate(exrate);
  }

  public void updateHuilv(ExRate exrate) throws GSException {
    /**@todo Complete this method*/
    ordersumdao.updateExRate(exrate);
  }

  public void removeHuilv(String name) throws GSException {
    /**@todo Complete this method*/
    ordersumdao.removeExRate(name);
  }

  public List findHuilv(String wherestr) throws GSException {
    /**@todo Complete this method*/
    return ordersumdao.findExRate(wherestr);
  }







  public int createProcessStep(ProcessStep ps) throws GSException {
    /**@todo Complete this method*/
    return ordersumstepdao.createOrderSumStep(ps);
  }

  public void removeProcessStep(int id) throws GSException {
    /**@todo Complete this method*/
    ordersumstepdao.removeOrderSumStep(id);
  }

  public void updateProcessStep(ProcessStep ps) throws GSException {
    /**@todo Complete this method*/
    ordersumstepdao.updateOrderSumStep(ps);
  }

  public List findProcessStep(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return ordersumstepdao.findOrderSumStep(whereStr);
  }

  public int createOrderSumMain(OrderSumMain osm) throws GSException {
    /**@todo Complete this method*/
    return ordersummaindao.createOrderSumMain(osm);
  }

  public void removeOrderSumMain(int id) throws GSException {
    /**@todo Complete this method*/
    ordersummaindao.removeOrderSumMain(id);
  }

  public void updateOrderSumMain(OrderSumMain osm) throws GSException {
    /**@todo Complete this method*/
    ordersummaindao.updateOrderSumMain(osm);
  }

  public List findOrderSumMain(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return ordersummaindao.findOrderSumMain(whereStr);
  }

  public int createOrderSumSub(OrderSumSub oss) throws GSException {
    /**@todo Complete this method*/
    return ordersumsubdao.createOrderSumSub(oss);
  }

  public void removeOrderSumSub(int id) throws GSException {
    /**@todo Complete this method*/
    ordersumsubdao.removeOrderSumSub(id);
  }

  public void updateOrderSumSub(OrderSumSub oss) throws GSException {
    /**@todo Complete this method*/
    ordersumsubdao.updateOrderSumSub(oss);
  }

  public List findOrderSumSub(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return ordersumsubdao.findOrderSumSub(whereStr);
  }

  public List findOrderSumSubByPages(int page, int pagePerNum) throws GSException {
    /**@todo Complete this method*/
    return ordersumsubdao.findOrderSumSubByPages(page, pagePerNum);
  }

  public List findOrderSumMainByPages(int page, int pagePerNum) throws GSException {
    /**@todo Complete this method*/
    return ordersummaindao.findOrderSumMainByPage(page, pagePerNum);
  }

  public List findProcessStepByPages(int page, int pagePerNum) throws GSException {
    /**@todo Complete this method*/
    return ordersumstepdao.findOrderSumStepByPages(page, pagePerNum);
  }



  public OrderSumMain getERPKaimo(OrderSumMain osm) throws GSException {
    /**@todo Complete this method*/
    return ordersummaindao.getERPKaimo(osm);
  }

  public OrderSumMain getERPMaopi(OrderSumMain osm) throws GSException {
    /**@todo Complete this method*/
    return ordersummaindao.getERPMaopi(osm);
  }

  public List dealProcessList(List processList) {
    /**@todo Complete this method*/
    return null;
  }

  public Float getYield(String whereStr, String ssign, String spec, String plate, int month1, int year1, int factory) throws GSException {
    /**@todo Complete this method*/
    return workflowsteprelationdao.getYield(whereStr,ssign,spec,plate,month1,year1,factory);
  }

  public int getOSMTotalNum(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return ordersummaindao.getTotalNums(whereStr);
  }

  public int getOSSTotalNum(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return ordersumsubdao.getTotalNums(whereStr);
  }

  public int getPSTotalNum(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return ordersumstepdao.getTotalNums(whereStr);
  }

  public List findDianDuPriceByPages(int start, int limit) throws GSException {
    /**@todo Complete this method*/
    return diandudao.findDianDuByPage(start, limit);
  }

  public int getDDTotalNum(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return diandudao.getTotalNums(whereStr);
  }








  public String findERPKaiMo(String salesid) throws GSException {
    /**@todo Complete this method*/
    return ordersumdao.findERPKaiMo(salesid);
  }

  public List findOrderSumMainByPagesWhere(int page, int pagePerNum, String whereStr) throws GSException {
    /**@todo Complete this method*/
    return ordersummaindao.findOrderSumMainByPageWhere(page, pagePerNum,
	whereStr);
  }
  public int createWorkflowStepRelation(WorkflowStepRelation wsr) throws GSException {
    /**@todo Complete this method*/
    return workflowsteprelationdao.createWorkflowStepRelation(wsr);
  }
  public void updateWorkflowStepRelation(WorkflowStepRelation wsr) throws GSException {
    /**@todo Complete this method*/
    workflowsteprelationdao.updateWorkflowStepRelation(wsr);
  }
  public void removeWorkflowStepRelation(int id) throws GSException {
    /**@todo Complete this method*/
    workflowsteprelationdao.removeWorkflowStepRelation(id);
  }
  public List findWorkflowStepRelation(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return workflowsteprelationdao.findWorkflowStepRelation(whereStr);
  }
  public List findWorkflowStepRelationByPage(int start, int limit, String whereStr) throws GSException {
    /**@todo Complete this method*/
    return workflowsteprelationdao.findWorkflowStepRelationByPageWhere(start,limit,whereStr);
  }
  public int getWSRtTotalNums(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return workflowsteprelationdao.getTotalNums(whereStr);
  }
  public boolean testSearchSql(String whereStr, String map, String workflow) throws GSException {
    /**@todo Complete this method*/
    return workflowsteprelationdao.testSearchSql(whereStr,map,workflow);
  }
  public int createSpecType(SpecType stype) throws GSException {
    /**@todo Complete this method*/
    return spectypedao.createSpecType(stype);
  }
  public void updateSpecType(SpecType stype) throws GSException {
    /**@todo Complete this method*/
    spectypedao.updateSpecType(stype);
  }
  public void removeSpecType(int id) throws GSException {
    /**@todo Complete this method*/
    spectypedao.removeSpecType(id);
  }
  public List findSpecType(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return spectypedao.findSpecType(whereStr);
  }
  public int getSpecTypeTotalNums(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return spectypedao.getTotalNums(whereStr);
  }
  public List findSpecTypeByPage(int start, int limit, String whereStr) throws GSException {
    /**@todo Complete this method*/
    return spectypedao.findSpecTypeByPageWhere(start,limit,whereStr);
  }
  public int createOutProcess(OutProcess oprocess) throws GSException {
    /**@todo Complete this method*/
    return outprocessdao.createOutProcess(oprocess);
  }
  public void updateOutProcess(OutProcess oprocess) throws GSException {
    /**@todo Complete this method*/
    outprocessdao.updateOutProcess(oprocess);
  }
  public void removeOutProcess(int id) throws GSException {
    /**@todo Complete this method*/
    outprocessdao.removeOutProcess(id);
  }
  public List findOutProcess(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return outprocessdao.findOutProcess(whereStr);
  }
  public int getOutProcessTotalNums(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return outprocessdao.getTotalNums(whereStr);
  }
  public List findOutProcessByPage(int start, int limit, String whereStr) throws GSException {
    /**@todo Complete this method*/
    return outprocessdao.findOutProcessByPageWhere(start,limit,whereStr);
  }
  public OutProcess getKnife(String specType, spec after, GsFilter gsf) throws GSException {
    /**@todo Complete this method*/
    return outprocessdao.getKnife(specType,after,gsf);
  }
  public int createProcessFee(ProcessFee pfee) throws GSException {
    /**@todo Complete this method*/
    return processfeedao.createProcessFee(pfee);
  }
  public void updateProcessFee(ProcessFee pfee) throws GSException {
    /**@todo Complete this method*/
    processfeedao.updateProcessFee(pfee);
  }
  public void removeProcessFee(int id) throws GSException {
    /**@todo Complete this method*/
    processfeedao.removeProcessFee(id);
  }
  public int getProcessFeeTotalNums(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return processfeedao.getTotalNums(whereStr);
  }
  public List findProcessFeeByPage(int start, int limit, String whereStr) throws GSException {
    /**@todo Complete this method*/
    return processfeedao.findProcessFeeByPageWhere(start,limit,whereStr);
  }
  public ProcessFee getProcessFee(String whereStr, spec after) throws GSException {
    /**@todo Complete this method*/
    return processfeedao.getProcessFee(whereStr,after);
  }
  public int createProcessYield(ProcessYield pyield) throws GSException {
    /**@todo Complete this method*/
    return processyielddao.createProcessYield(pyield);
  }
  public void updateProcessYield(ProcessYield pyield) throws GSException {
    /**@todo Complete this method*/
    processyielddao.updateProcessYield(pyield);
  }
  public void removeProcessYield(int id) throws GSException {
    /**@todo Complete this method*/
    processyielddao.removeProcessYield(id);
  }
  public int getProcessYieldTotalNums(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return processyielddao.getTotalNums(whereStr);
  }
  public List findProcessYieldByPage(int start, int limit, String whereStr) throws GSException {
    /**@todo Complete this method*/
    return processyielddao.findProcessYieldByPageWhere(start,limit,whereStr);
  }
  public ProcessYield getProcessYield(String whereStr, String procs) throws GSException {
    /**@todo Complete this method*/
    return processyielddao.getDefaultYield(whereStr,procs);
  }
  public int createProcessName(ProcessName pname) throws GSException {
    /**@todo Complete this method*/
    return processnamedao.createProcessName(pname);
  }
  public void updateProcessName(ProcessName pname) throws GSException {
    /**@todo Complete this method*/
    processnamedao.updateProcessName(pname);
  }
  public void removeProcessName(int id) throws GSException {
    /**@todo Complete this method*/
    processnamedao.removeProcessName(id);
  }
  public int getProcessNameTotalNums(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return processnamedao.getTotalNums(whereStr);
  }
  public List findProcessNameByPage(int start, int limit, String whereStr) throws GSException {
    /**@todo Complete this method*/
    return processnamedao.findProcessNameByPageWhere(start,limit,whereStr);

  }
  public int createProcessArea(ProcessArea parea) throws GSException {
    /**@todo Complete this method*/
    return processareadao.createProcessArea(parea);
  }
  public void updateProcessArea(ProcessArea parea) throws GSException {
    /**@todo Complete this method*/
    processareadao.updateProcessArea(parea);
  }
  public void removeProcessArea(int id) throws GSException {
    /**@todo Complete this method*/
    processareadao.removeProcessArea(id);
  }
  public int getProcessAreaTotalNums(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return processareadao.getTotalNums(whereStr);
  }
  public List findProcessAreaByPage(int start, int limit, String whereStr) throws GSException {
    /**@todo Complete this method*/
    return processareadao.findProcessAreaByPageWhere(start,limit,whereStr);
  }
  public int createProcessFlow(ProcessFlow pflow) throws GSException {
    /**@todo Complete this method*/
    return processflowdao.createProcessFlow(pflow);
  }
  public void updateProcessFlow(ProcessFlow pflow) throws GSException {
    /**@todo Complete this method*/
    processflowdao.updateProcessFlow(pflow);
  }
  public void removeProcessFlow(int id) throws GSException {
    /**@todo Complete this method*/
    processflowdao.removeProcessFlow(id);
  }
  public int getProcessFlowTotalNums(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return processflowdao.getTotalNums(whereStr);
  }
  public List findProcessFlowByPage(int start, int limit, String whereStr) throws GSException {
    /**@todo Complete this method*/
    return processflowdao.findProcessFlowByPageWhere(start,limit,whereStr);
  }
  public void updateProcessGate(ProcessGate pgate) throws GSException {
    /**@todo Complete this method*/
    processgatedao.updateProcessGate(pgate);
  }
  public int getProcessGateTotalNums(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return processgatedao.getTotalNums(whereStr);
  }
  public List findProcessGateByPage(int start, int limit, String whereStr) throws GSException {
    /**@todo Complete this method*/
    return processgatedao.findProcessGateByPageWhere(start,limit,whereStr);
  }
  public ProcessFlow getFlow(String spec) throws GSException {
    /**@todo Complete this method*/
    return processflowdao.getFlow(spec);
  }
  public List findOtherConstants(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return otherconstantsdao.findOtherConstants(whereStr);
  }
  public List findOtherConstantsByPage(int start, int limit, String whereStr) throws GSException {
    /**@todo Complete this method*/
    return otherconstantsdao.findOtherConstantsByPageWhere(start,limit,whereStr);
  }
  public void updateOtherConstants(OtherConstants otherconstants) throws GSException {
    /**@todo Complete this method*/
    otherconstantsdao.updateOtherConstants(otherconstants);
  }
  public int getOtherCosntantsTotalNum(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return otherconstantsdao.getTotalNums(whereStr);
  }
  public int createSsignDensity(SsignDensity sd) throws GSException {
    /**@todo Complete this method*/
    return ssigndensitydao.createSsignDensity(sd);
  }
  public void updateSsignDensity(SsignDensity sd) throws GSException {
    /**@todo Complete this method*/
    ssigndensitydao.updateSsignDensity(sd);
  }
  public void   removeSsignDensity(int id) throws GSException {
    /**@todo Complete this method*/
    ssigndensitydao.removeSsignDensity(id);
  }
  public List findSsignDensityByPage(int start, int limit, String whereStr) throws GSException {
    /**@todo Complete this method*/
    return ssigndensitydao.findSsignDensityByPageWhere(start,limit,whereStr);
  }
  public int getSsignDensityTotalNums(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return ssigndensitydao.getTotalNums(whereStr);
  }
  public List findSsignDensity(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return ssigndensitydao.findSsignDensity(whereStr);
  }
  public List getProcessSpec(String transnum, String step, String map) throws GSException {
    /**@todo Complete this method*/
    return workflowsteprelationdao.getProcessSpec(transnum,step,map);
  }
  public Float getProcessArea(String whereStr, spec after, spec beforeSpec) throws GSException {
    /**@todo Complete this method*/
   // System.out.println("getProcessArea");
    return processareadao.getArea(whereStr,after,beforeSpec);
  }
  public List getErpKaiMoList(String transnum) throws GSException {
    /**@todo Complete this method*/
    return ordersumdao.findERPKaiMoList(transnum);
  }
  public List findLikeSpec(String workflow, String map, String spec) throws GSException {
    /**@todo Complete this method*/
    return workflowsteprelationdao.findLikeSpec(workflow,map,spec);
  }
  public int createDefaultCheck(DefaultCheck dcheck) throws GSException {
    /**@todo Complete this method*/
    return defaultcheckdao.createDefaultCheck(dcheck);
  }
  public void updateDefaultCheck(DefaultCheck dcheck) throws GSException {
    /**@todo Complete this method*/
    defaultcheckdao.updateDefaultCheck(dcheck);
  }
  public void removeDefaultCheck(int id) throws GSException {
    /**@todo Complete this method*/
    defaultcheckdao.removeDefaultCheck(id);
  }
  public List findDefaultCheck(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return defaultcheckdao.findDefaultCheck(whereStr);
  }
  public List findDefaultCheckByPage(int start, int limit, String whereStr) throws GSException {
    /**@todo Complete this method*/
    return defaultcheckdao.findDefaultCheckByPageWhere(start,limit,whereStr);
  }
  public int getDefaultCheckTotalNums(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return defaultcheckdao.getTotalNums(whereStr);
  }
  public Float getDefaultCheck(String whereStr, String spec) throws GSException {
    /**@todo Complete this method*/
    return defaultcheckdao.getCheckValue(whereStr,spec);
  }
  public List getFactoryBySpec(String prdtid) throws GSException {
    /**@todo Complete this method*/
    return workflowsteprelationdao.findFactoryBySpec(prdtid);
  }
  public int createQianDaoYield(QianDaoYield qdy) throws GSException {
    /**@todo Complete this method*/
    return qiandaoyielddao.createQianDaoYield(qdy);
  }
  public void removeQianDaoYield(int id) throws GSException {
    /**@todo Complete this method*/
    qiandaoyielddao.removeQianDaoYield(id);
  }
  public void updateQianDaoYield(QianDaoYield qdy) throws GSException {
    /**@todo Complete this method*/
    qiandaoyielddao.updateQianDaoYield(qdy);
  }
  public List findQianDaoYield(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return qiandaoyielddao.findQianDaoYield(whereStr);
  }
  public List findQianDaoYieldByPages(int start, int limit, String whereStr) throws GSException {
    /**@todo Complete this method*/
    return qiandaoyielddao.findQianDaoYieldByPageWhere(start,limit,whereStr);
  }
  public int getQianDaoYieldTotalNums(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return qiandaoyielddao.getTotalNums(whereStr);
  }
  public GSCalcAction getGSCalc() {
    /**@todo Complete this method*/
    return gsc;
  }
  public List findProcessArea(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return processareadao.findProcessArea(whereStr);
  }
  public int createPeiFangPrice(PeiFangPrice pf) throws GSException {
    /**@todo Complete this method*/
    return peifangpricedao.createPeiFangPrice(pf);
  }
  public void updatePeiFangPrice(PeiFangPrice pf) throws GSException {
    /**@todo Complete this method*/
    peifangpricedao.updatePeiFangPrice(pf);
  }
  public List findPeiFangPrice(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return peifangpricedao.findPeiFangPrice(whereStr);
  }
  public List findPeiFangPriceByPages(String whereStr, int start, int limit) throws GSException {
    /**@todo Complete this method*/
    return peifangpricedao.findPeiFangPriceByPageWhere(start,limit,whereStr);
  }
  public int getPeiFangPriceTotalNums(String whereStr) throws GSException {
    /**@todo Complete this method*/
    return peifangpricedao.getTotalNums(whereStr);
  }
  public boolean storePeiFangPrice(String ssign, String factory, Float price, Date date1) throws GSException {
    /**@todo Complete this method*/
    return peifangpricedao.stroePeiFang(ssign,factory,price,date1);
  }
  public void removePeiFangPrice(int id) throws GSException {
    /**@todo Complete this method*/
    peifangpricedao.removePeiFangPrice(id);
  }
  public boolean totalControl(Date dateFrom, Date dateTo) throws GSException {
    /**@todo Complete this method*/
    return ordersumdao.totalControlTemplateMap(dateFrom,dateTo);
  }
  public void testLog() {
    /**@todo Complete this method*/
   // System.out.println("start to testLog");

    log.debug("Is the log working?");
    log.info("info is out");
    log.error("error is out");
    log.fatal("fatal is out");


    log.info(""+log.isDebugEnabled());
    log.info(""+log.isErrorEnabled());
    log.info(""+log.isFatalEnabled());
    log.info(""+log.isInfoEnabled());
    log.info(""+log.isTraceEnabled());
    log.info(""+log.isWarnEnabled());
    //System.out.println("ok");
  }
  /*public void removeCostFkK(CostFkK costsp) {
    costfkkdao.d
     }*/
}